﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WUCIndexTopNews.ascx.cs"
    Inherits="NJL.WebUsers.Controls.WUCIndexTopNews" %>
<%@ Import Namespace="Royalsoft.Common" %>
<script type="text/javascript" language="javascript">
    function tab(div, css) {
        document.getElementById("hot").style.display = "none";
        document.getElementById("notice").style.display = "none";
        document.getElementById(div).style.display = "block";
        document.getElementById("hotcss").className = "";
        document.getElementById("noticecss").className = "";
        document.getElementById(css).className = "now";
    }

</script>
<%
    if (UserId == "" || UserName == "")
    {         
%>
<script language="javascript" type="text/javascript">
    $(document).ready(function () {
        //示例9，综合效果
        var t9 = new PopupLayer({ trigger: "#secondlogin", popupBlk: "#blk9", closeBtn: "#close9", useOverlay: true, useFx: true,
            offsets: {
                x: 0,
                y: -41
            }
        });
        t9.doEffects = function (way) {
            if (way == "open") {
                this.popupLayer.css({ opacity: 0.3 }).show(400, function () {
                    this.popupLayer.animate({
                        left: ($(document).width() - this.popupLayer.width()) / 2,
                        top: (document.documentElement.clientHeight - this.popupLayer.height()) / 2 + $(document).scrollTop(),
                        opacity: 0.8
                    }, 1000, function () { this.popupLayer.css("opacity", 1) } .binding(this));
                } .binding(this));
                document.getElementById('Login').src = '<%=WEBSITE_USRE_DOMAIN %>/SecondLogin.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=Request.RawUrl %>';
            }
            else {
                this.popupLayer.animate({
                    left: this.trigger.offset().left,
                    top: this.trigger.offset().top,
                    opacity: 0.1
                }, { duration: 500, complete: function () { this.popupLayer.css("opacity", 1); this.popupLayer.hide() } .binding(this) });
            }
        }
    });
</script>
<div id="blk9" class="blk">
    <div class="popup_title">
        <span class="f_right"><a href="javascript:void(0)" id="close9">关闭</a></span>
        <ul>
            <li class="now"><a  href="<%=WEBSITE_USRE_DOMAIN %>/SecondLogin.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=Request.RawUrl %>"
                target="main">登录</a> </li>
        </ul>
    </div>
    <div>
        <iframe id="Login" name="main" width="500" height="420" style="overflow: hidden;
            border: none;"></iframe>
    </div>
</div>
<%
    }
%>
<div>
    <!--今日头条-->
    <div class="newsToday">
        <h2>
            今日头条</h2>
        <div>
            <div class="firstNews">
                <%
                    if (LIST_LEFT.Count > 0)
                    {
                %>
                <h3>
                    <a target="_blank" title="<%=LIST_LEFT[0].NEWS_TITLE %>" href="/xckb/<%=LIST_LEFT[0].TYPE_CODE %>/<%=LIST_LEFT[0].ID %>.html">
                        <%if (LIST_LEFT[0].NEWS_TITLE.Length > 11) Response.Write(LIST_LEFT[0].NEWS_TITLE.Substring(0, 11) + "..."); else Response.Write(LIST_LEFT[0].NEWS_TITLE);%></a></h3>
                <p>
                    <%if (LIST_LEFT[0].NEWS_SUBJECT_TITLE.Length > 31) Response.Write(LIST_LEFT[0].NEWS_SUBJECT_TITLE.Substring(0, 31) + "..."); else Response.Write(LIST_LEFT[0].NEWS_SUBJECT_TITLE); %>
                </p>
                <%
                    }
                %>
            </div>
            <div class="hotinfo" style="width: 204px;">
                <div id="hot" style="height: 123px;">
                    <p>
                        <% 
                            System.Random random = new Random();
                            for (int i = 0; i < LIST_TAG.Count; i++)
                            {
                                int iRandom = random.Next(0, 9);
                        %>
                        <a target="_blank" href="/SearchList.aspx?key=<%=Server.UrlEncode(LIST_TAG[i].TAG) %>&cc=<%=WEBSITE_FOCUS_CITY_NAME_PINYIN%>"
                            class="tag<%=iRandom.ToString() %>">
                            <%=LIST_TAG[i].TAG%>
                        </a>
                        <%
}
                        %>
                    </p>
                </div>
            </div>
        </div>
    </div>
    <!--右侧信息-->
    <div class="f_right adsinfo">
        <!--ads-->
        <div class="f_left">
            <div style="height: 235px; overflow: hidden; width: 503px;" class="box">
                <script type="text/javascript" language="javascript" src="/Scripts/jquery.KinSlideshow-1.1.js"></script>
                <script type="text/javascript">
                    $(function () {
                        $("#KinSlideshow").KinSlideshow({ isHasTitleBar: false, isHasTitleFont: false, moveStyle: "up" });
                    })
                </script>
                <div id="KinSlideshow" style="visibility: hidden;">
                    <%
                        for (int i = 0; i < LIST_FLASH.Count; i++)
                        {
                    %>
                    <a href="<%=LIST_FLASH[i].LINK_TO_URL %>" title="<%=LIST_FLASH[i].NEWS_TITLE %>"
                        target="_blank">
                        <img src="<%=GetImageUrl(LIST_FLASH[i].IMAGE_CODE) %>" alt="<%=LIST_FLASH[i].NEWS_TITLE %>"
                            width="503px" height="235px" /></a>
                    <% 
                        }
                    %>
                </div>
            </div>
        </div>
        <!--登录-->
        <div class="f_right" style="width: 258px; overflow: hidden;">
            <div class="help-guest">
                <span class="help-guest-register"><a href="/Register.aspx" target="_blank" title="完全免费注册,赶快加入吧">
                </a></span><span class="help-guest-login"><a id="secondlogin" style="cursor:pointer" title="立即登录农家乐,享受快乐吧">
                </a></span>
            </div>
            <div class="fastlogin">
                <div>
                    <span><a style="cursor: pointer" onclick="javascript:openQQ()" title="QQ登录" class="fastlogin_qq">
                    </a></span><span><a style="cursor: pointer" onclick="javascript:openSina()" title="新浪微博登录"
                        class="fastlogin_sina"></a></span><span><a style="cursor: pointer" onclick="javascript:openRenRen()"
                            title="人人登录" class="fastlogin_renren"></a></span>
                </div>
                <div class="">
                    您还可以通过这些快捷的方式登录。
                </div>
            </div>
        </div>
    </div>
</div>
